package com.software.graduationproject.modules.sys.entity;

import cn.hutool.core.date.DatePattern;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.v2coding.validate.CreateGroup;
import com.v2coding.validate.UpdateGroup;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.v2coding.mybatis.model.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.*;
import java.util.Date;
import java.math.BigDecimal;

/**
 * SysUserRole : 客户用户
 * ---------------------------------------------------------------------------------------------------------------------
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("sys_user_role")
@ApiModel(value = "SysUserRole", description = "客户用户")
public class SysUserRole extends BaseModel<SysUserRole> {

    @TableField(value ="user_id")
    @ExcelProperty(value = "系统用户ID")
    @ApiModelProperty(value = "系统用户ID")
    @NotNull(groups = {CreateGroup.class, UpdateGroup.class}, message = "系统用户ID不能为空")
    private Long userId;

    @TableField(value ="role_id")
    @ExcelProperty(value = "所属客户ID")
    @ApiModelProperty(value = "所属客户ID")
    @NotNull(groups = {CreateGroup.class, UpdateGroup.class}, message = "所属客户ID不能为空")
    private Long roleId;

}
